﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DataImporter.Modules;

namespace DataImporter
{
    public partial class frmMain : Form
    {
        private ucXXGZFY ucXXGZFY = null;
        private ucTJZBPG ucTJZBPG = null;
        private ucQuestions ucQuestions = null;
        private ucExamItems ucExamItems = null;
        private ucGJA ucGJA = null;
        private ucRXA ucRXA = null;
        private ucTNB ucTNB = null;
        private ucTF ucTF = null;
        private ucVA ucVA = null;

        public frmMain()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 点击新型冠状肺炎
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lklblXXGZFY_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucXXGZFY)
            {
                ucXXGZFY = new ucXXGZFY
                {
                    Dock = DockStyle.Fill
                };
                pnlMain.Controls.Add(ucXXGZFY);
            }
            ucXXGZFY.BringToFront();
        }

        /// <summary>
        /// 点击TJZBPG
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lklblTJZBPG_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucTJZBPG)
            {
                ucTJZBPG = new ucTJZBPG { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucTJZBPG);
            }
            ucTJZBPG.BringToFront();
        }

        /// <summary>
        /// 窗体加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmMain_Load(object sender, EventArgs e)
        {
            lklblTJZBPG_LinkClicked(null, null);
        }

        private void lklbl_Questions_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucQuestions)
            {
                ucQuestions = new ucQuestions { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucQuestions);
            }
            ucQuestions.BringToFront();
        }

        private void lklblExamItems_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucExamItems)
            {
                ucExamItems = new ucExamItems { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucExamItems);
            }
            ucExamItems.BringToFront();
        }

        private void lklblGJA_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucGJA)
            {
                ucGJA = new ucGJA { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucGJA);
            }
            ucGJA.BringToFront();
        }

        private void lklblRXA_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucRXA)
            {
                ucRXA = new ucRXA { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucRXA);
            }
            ucRXA.BringToFront();
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucTNB)
            {
                ucTNB = new ucTNB { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucTNB);
            }
            ucTNB.BringToFront();
        }

        private void lklblGout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucTF)
            {
                ucTF = new ucTF { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucTF);
            }
            ucTF.BringToFront();
        }

        private void lklblVA_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (null == ucVA)
            {
                ucVA = new ucVA { Dock = DockStyle.Fill };
                pnlMain.Controls.Add(ucVA);
            }
            ucVA.BringToFront();
        }
    }
}
